﻿//
// Created by francklinson on 2021/3/31.
//

// pe14-5.cpp
// useemp1.cpp -- using the abstr_emp classes

#include <iostream>

using namespace std;

#include "emp.h"

int main(void)
{
    employee em("Trip", "Harris", "Thumper");
    cout << em;
    em.ShowAll();
    manager ma("Amorphia", "Spindragon", "Nuancer", 5);
    cout << ma;
    ma.ShowAll();

    fink fi("Matt", "Oggs", "Oiler", "Juno Barr");
    cout << fi;
    fi.ShowAll();
    highfink hf(ma, "Curly Kew"); // recruitment?
//    highfink hf(fi,5);
    hf.ShowAll();
//    cout << "Press a key for next phase:\n";
//    cin.get();
    cout << "-----------------" << endl;
    highfink hf2;
    hf2.SetAll();

    cout << "Using an abstr_emp * pointer:\n";
    abstr_emp *tri[4] = {&em, &fi, &hf, &hf2};
    for (int i = 0; i < 4; i++)
    {
        tri[i]->ShowAll();
        cout << "--------------------" << endl;
    }

    return 0;
}